package com.zwq.springbootlearn.exception;

import com.zwq.springbootlearn.enums.ResultEnum;

/**
 * @Author: zwq
 * Create in 2018/6/30 17:25
 */
//继承RuntimeException可以回滚，不要继承Exception
public class GirlException extends RuntimeException {

    private Integer code;

    public GirlException(ResultEnum resultEnum){
        super(resultEnum.getMsg());
        this.code=resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
